{% extends "layout.html" %}
{% block title %}城市列表{% endblock %}
{% block content %}
<div class="container">
<div style="margin-bottom: 10px"><a class="btn btn-success" href="/city/add/" target="_blank"><span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span> 新增城市</a></div>
<div><div class="panel panel-default">
  <div class="panel-heading"><span class="glyphicon glyphicon-th-list" aria-hidden="true"></span> 城市列表</div>
  <div class="panel-body">
   <table class="table table-bordered">
      <thead>
        <tr>
          <th>ID</th>
          <th>logo</th>
          <th>名称</th>
          <th>人口</th>
        </tr>
      </thead>
      <tbody>
      {% for item in queryset %}
        <tr>
          <th scope="row">{{ item.id }}</th>
          <td><img style="width:120px;height: 80px" src="/media/{{ item.img }}"></td>
          <td>{{ item.name }}</td>
          <td>{{ item.count }}</td>
{#          <td><a class="btn btn-primary btn-xs" href="/depart/{{ item.id }}/edit/">编辑</a>#}
{#          <a class="btn btn-danger btn-xs" href="/depart/delete/?nid={{ item.id }}">删除</a></td>#}
        </tr>
      {% endfor %}
      </tbody>
    </table>
  </div>
</div></div>
<ul class="pagination" style="float: left">
    {{ page_string }}
</ul>
    </div>
{% endblock %}